package com.jp.knowledge.fragment;

import android.content.Intent;
import android.os.Bundle;

import com.jp.knowledge.activity.JobKnowledgeDetailActivity;
import com.jp.knowledge.activity.PositionToolsDetailActivity;
import com.jp.knowledge.model.PositionKnowlegeMode;

/**
 * Created by 528787067@qq.com on 2017/7/14.
 */

public class PositonToolsDataFragment extends JobKnowledgeDataFragment {

	public static PositonToolsDataFragment newInstance(PositionKnowlegeMode data){
		PositonToolsDataFragment fragment = new PositonToolsDataFragment();
		Bundle bundle = new Bundle();
		bundle.putSerializable("data", data);
		fragment.setArguments(bundle);
		return fragment;
	}

	@Override
	public void onItemClick(int mainPosition, int subPosition) {
		startActivity(new Intent(mContext, PositionToolsDetailActivity.class)
				.putExtra("name", data.getList().get(mainPosition).getList().get(subPosition).getName())
				.putExtra("id", data.getList().get(mainPosition).getList().get(subPosition).getId()));
	}
}
